

public class Dog extends Animal{
    private String name;
    public void setName(String name){
        this.name=name;
    }
    public String getName(){
        return name;
    }
    public void show(){
        System.out.println("父类方法  getColor():"+getColor());
        System.out.println("父类属性：age:"+age);
        System.out.println("子类属性：name:"+name);
    }
    public void showAge(){
        System.out.println("age:"+age);
        System.out.println("this.age:"+this.age);
        System.out.println("super.age:"+super.age);
    }
    
}
